package org.example.platform.design.zerenlian.shizhan;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class YiJi extends ShenPo{
    private SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 时间格式化



    @Override
    public AuthInfo getResult(AuthInfo authInfo) throws ParseException {
        Date date = AuthService.queryAuthInfo("1000013", authInfo.getId());

        // 一级审批
        if (authInfo.getDate().after(f.parse("2020-06-11 00:00:00")) && authInfo.getDate().before(f.parse("2020-06-20 23:59:59"))) {
            date = AuthService.queryAuthInfo("1000011", authInfo.getId());
            if (null == date) return new AuthInfo("0001", "单号：", authInfo.getId(), " 状态：待一级审批负责人 ", "段总");
        }

        return new AuthInfo("0001", "单号：", authInfo.getId(), " 状态：审批完成",null);
    }
}
